//package com.controller;
//
//import com.pojo.Project;
//import com.pojo.Result;
//import com.service.ProjectService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@RequestMapping("/projects")
//@Validated
//public class ProjectController {
//    @Autowired
//    private ProjectService projectService;
//
//    // 创建项目
//    @PostMapping
//    public Result createProject(@RequestBody Project project) {
//        projectService.create(project);
//        return Result.success();
//    }
//
//    // 根据部门查询项目
//    @GetMapping("/department/{deptId}")
//    public Result listByDepartment(@PathVariable Integer deptId) {
//        return Result.success(projectService.listByDepartment(deptId));
//    }
//
//    // 更新项目进度
//    @PatchMapping("/{id}/progress")
//    public Result updateProgress(@PathVariable Integer id,
//                                 @RequestParam String progress) {
//        projectService.updateProgress(id, progress);
//        return Result.success();
//    }
//}
